package com.example.thymeleaf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class ConditionController {

    @GetMapping("ifunless")
    public String ifUnless(Integer i, Model model) {
        model.addAttribute("i", i);
        return "ifunless";
    }

    @GetMapping("switch")
    public String switch1(Integer key, Model model) {
        model.addAttribute("key", key);
        return "ifunless";
    }
}
